#pragma once

#include <ntifs.h>

#define DEVICE_SEND CTL_CODE(FILE_DEVICE_UNKNOWN, 0x801, METHOD_BUFFERED, FILE_WRITE_DATA)
#define DEVICE_RECIEVE CTL_CODE(FILE_DEVICE_UNKNOWN, 0x802, METHOD_BUFFERED, FILE_READ_DATA)

#define DEVICE_FREEZE CTL_CODE(FILE_DEVICE_UNKNOWN, 0x803, METHOD_BUFFERED, FILE_WRITE_DATA | FILE_READ_DATA)
#define DEVICE_FREEZE_ID CTL_CODE(FILE_DEVICE_UNKNOWN, 0x804, METHOD_BUFFERED, FILE_WRITE_DATA | FILE_READ_DATA)

#define DEVICE_PRIVILEGE_ADD CTL_CODE(FILE_DEVICE_UNKNOWN, 0x805, METHOD_BUFFERED, FILE_WRITE_DATA | FILE_READ_DATA)
#define DEVICE_PRIVILEGE_ADD_ID CTL_CODE(FILE_DEVICE_UNKNOWN, 0x806, METHOD_BUFFERED, FILE_WRITE_DATA | FILE_READ_DATA)

#pragma pack(1)
typedef struct _PRIVILEGE_DATA
{
	ULONG ProcessID;
	enum PRIVILEGES Privilege;
}PRIVILEGE_DATA, *PPRIVILEGE_DATA;

NTSTATUS IRPDispatch(PDEVICE_OBJECT, PIRP);
NTSTATUS IRPDispatchDevCTL(PDEVICE_OBJECT, PIRP);
VOID Unload(PDRIVER_OBJECT);